package com.foodsafe.action;

import javax.annotation.Resource;

import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.foodsafe.service.AddivieinfoService;
import com.opensymphony.xwork2.ActionSupport;

@Component("AddivieninfoContentAction")
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class AddivieninfoContentAction extends ActionSupport {

	private int id;
	private AddivieinfoService addivieinfoService;
	private String content;

	public String getContent() {
		return content;
	}

	public void setId(int id) {
		this.id = id;
	}

	@Resource
	public void setAddivieinfoService(AddivieinfoService addivieinfoService) {
		this.addivieinfoService = addivieinfoService;
	}

	@Override
	public String execute() throws Exception {
		content = addivieinfoService.getAddivieinfoContent(id);
		return SUCCESS;
	}
	
}
